<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of debugMy
 *
 * @author Administrator
 */
class debugMy {
    //put your code here
var $info;
public function debugMy()
{
    $this->info=array();
}
public function log($message){

    array_push($this->info, $message);
}
function __destruct(){
    if(count($this->info)>0)
    {
        foreach($this->info as $key=>$value)
        {
        ?>
<script type='text/javascript'>
    console.log("<?php echo $value?>");
</script>
<?php
        }
    }
}

}

?>
